/*------------------------------------------------------------------------------
 * Copyright 2012 NCR Corporation
 *------------------------------------------------------------------------------
 * All revision information is updated automatically from source code control
 * change records - please do not manually edit.
 *------------------------------------------------------------------------------
 *
 * $LastChangedRevision:: 2004                                     $
 * $LastChangedBy:: rb250096                                       $
 * $LastChangedDate:: 2012-04-03 21:38:22 -0400 (Tue, 03 Apr 2012) $
 */

package com.ncr.nep.dashboardcore.ui.client;

import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.cellview.client.CellTable;

/**
 * {@link CellTable} resources implementation that is empty, i.e. is does
 * not have CSS resource content compiled in; this is so that table styling
 * can be inherited from the actual element instead of from the various
 * cellTable* CSS classes.
 *
 * @author rb250096
 * @version $Revision: 2004 $
 */
public class UnstyledCellTableResources implements CellTable.Resources {

    /**
     * Styles that provide just unused CSS class names so that table styling
     * can be themed.
     */
    public class EmptyStyles implements CellTable.Style {

        /**
         * Constant defining name of empty css class that defines nothing.
         */
        private static final String EMPTY_CLASS_NAME = "nop";

        /**
         * Constant defining class used for selected elements; the class will
         * be ancestor-based against a table element and tied to a
         * <code>tr</code> or <code>td</code> element so it won't conflict
         * with other styles found elsewhere.
         */
        private static final String SELECTED_CLASS = "selected";
        
        @Override
        public String cellTableCell() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableEvenRow() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableEvenRowCell() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableFirstColumn() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableFirstColumnFooter() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableFirstColumnHeader() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableFooter() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableHeader() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableHoveredRow() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableHoveredRowCell() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableKeyboardSelectedCell() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableKeyboardSelectedRow() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableKeyboardSelectedRowCell() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableLastColumn() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableLastColumnFooter() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableLastColumnHeader() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableLoading() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableOddRow() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableOddRowCell() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableSelectedRow() {
            return SELECTED_CLASS;
        }

        @Override
        public String cellTableSelectedRowCell() {
            return SELECTED_CLASS;
        }

        @Override
        public String cellTableSortableHeader() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableSortedHeaderAscending() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableSortedHeaderDescending() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String cellTableWidget() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public boolean ensureInjected() {
            return true;
        }

        @Override
        public String getText() {
            return EMPTY_CLASS_NAME;
        }

        @Override
        public String getName() {
            return EMPTY_CLASS_NAME;
        }
    }

    @Override
    public ImageResource cellTableFooterBackground() {
        return null;
    }

    @Override
    public ImageResource cellTableHeaderBackground() {
        return null;
    }

    @Override
    public ImageResource cellTableLoading() {
        return null;
    }

    @Override
    public ImageResource cellTableSelectedBackground() {
        return null;
    }

    @Override
    public ImageResource cellTableSortAscending() {
        return null;
    }

    @Override
    public ImageResource cellTableSortDescending() {
        return null;
    }

    @Override
    public CellTable.Style cellTableStyle() {
        return new EmptyStyles();
    }
}
